/*
 * TClient.h
 *
 *  Created on: 2012-10-30
 *      Author: minhua
 */

#ifndef TCLIENT_H_
#define TCLIENT_H_

#include <QObject>
#include "../model/TSession.h"
#include "TAccesser.h"
#include "TDownloader.h"

class TClient : public QObject
{
	Q_OBJECT

// Static Member
private:
	static TClient *_instance;

// Static Method
public:
	static TClient *instance();

// Member
private:
	TSessionPointer _session;

// Method
public:
	TClient();
	virtual ~TClient();
	void join(TSessionPointer session);
	void cut();
	TAccesser *createAccesser();
	TDownloader *createDownloader();
	TSessionPointer getSession() const
	{
		return _session;
	}

};

#endif /* TCLIENT_H_ */
